package com.eight.common.pojo;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.google.errorprone.annotations.concurrent.LockMethod;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 专区
 * @TableName tb_zone
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "TabZone对象",description = "专区管理")
@TableName("tb_zone")
public class TbZone implements Serializable {
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键id")
    @TableId(type = IdType.ASSIGN_ID)//针对字符串和数字  生成值19 为绝对唯一 底层使用雪花算法
    private String id;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime gmtModified;

    /**
     * 状态(1:正常;0:禁用)
     */
    @ApiModelProperty(value = "状态(1:正常;0:禁用)")
    private Integer isDeleted;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer isDisable;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    private String zoneName;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String zoneDesc;

    @ApiModelProperty("专区对应课程")
    @TableField(exist = false)
    private List<ZoneCourse> zoneCourses;

    private static final long serialVersionUID = 1L;


}